package com.test.classify;

import java.util.ArrayList;
import java.util.List;

public class ItemClassify {

	/**
	 * 分类id
	 */
	private Integer id;

	/**
	 * 分类名称
	 */
	private String name;

	/**
	 * 分类父id
	 */
	private Integer pid;

	/**
	 * 排序权值，值越大越排到前面
	 */
	private Integer showRank;

	/**
	 * 表示当前分类的孩子（们）
	 */
	private List<ItemClassify> children = new ArrayList<>();

	
	
	
	/**
	 * @param id 表示分类id
	 * @param name 分类名称
	 * @param pid 父id
	 * @param showRank 排序
	 */
	public ItemClassify(Integer id, String name, Integer pid, Integer showRank) {
		this.id = id;
		this.name = name;
		this.pid = pid;
		this.showRank = showRank;
	}
	
	

	public ItemClassify() {
	}



	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the pid
	 */
	public Integer getPid() {
		return pid;
	}

	/**
	 * @param pid the pid to set
	 */
	public void setPid(Integer pid) {
		this.pid = pid;
	}

	/**
	 * @return the showRank
	 */
	public Integer getShowRank() {
		return showRank;
	}

	/**
	 * @param showRank the showRank to set
	 */
	public void setShowRank(Integer showRank) {
		this.showRank = showRank;
	}

	
	
	/**
	 * @return the children
	 */
	public List<ItemClassify> getChildren() {
		return children;
	}

	/**
	 * @param children the children to set
	 */
	public void setChildren(List<ItemClassify> children) {
		this.children = children;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ItemClassify [id=" + id + ", name=" + name + ", pid=" + pid + ", showRank=" + showRank + "]";
	}

}
